class Food {
  constructor(point, mapWidth, mapHeight) {
    Object.assign(this, { point, mapWidth, mapHeight });
  }

  newPosition() {
    this.point.x = Tools.getRandomNumber(0, this.mapWidth);
    this.point.y = Tools.getRandomNumber(0, this.mapHeight);
  }
}
